package com.springboot.test.exception;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author likai
 * @date 2021/10/13 5:49 PM
 * @email likai9376@163.com
 * @desc 处理全局异常
 */
@RestControllerAdvice
public class GlobalException {


    @ExceptionHandler(value = Exception.class)
    public Object onException() {
        return "error";
    }
}
